/**
 * v-clipboard 文字复制剪贴
 * Copyright (c) 2021 ruoyi
 */

export default {
  bind(el, binding, vnode) {
    const len = binding.expression
    el.oninput = function(event) {
      const value = event.target.value
      if (value.length > len) {
        event.target.value = value.slice(0, len)
      }
    }
  }
}

